<!DOCTYPE html>
<script src='../../resources/testharness.js'></script>
<script src='../../resources/testharnessreport.js'></script>
<style>
meter { -webkit-appearance: none; }
</style>
<meter>
  Hello,
  <span slot="blink">Blink</span>
  <span id="world">World</span>
</meter>
<script>
'use strict';

const meter = document.querySelector('meter');
const text = meter.firstChild;
const blink = document.querySelector('span[slot="blink"]');
const world = document.querySelector('#world');

test(() => {
  assert_equals(meter.shadowRoot, null);
  assert_equals(text.assignedSlot, null);
  assert_equals(blink.assignedSlot, null);
  assert_equals(world.assignedSlot, null);
}, 'UA shadow for <meter> should not be exposed via assignedSlot.');

async_test((test) => {
  meter.addEventListener('click', test.step_func_done((e) => {
    // expected: <span>, <meter>, <body>, <html>, #document, window
    const path = e.composedPath();
    assert_array_equals(path, [blink, meter, document.body,
                               document.documentElement, document, window]);
  }));
  blink.click();
}, 'UA shadow for <meter> should not be exposed to event.composedPath().');
</script>
